@extends('layout.adminlayout')
@section('css')
	<script src="/admin/js/metisMenu.min.js"></script>
	<script src="/admin/js/custom.js"></script>
	<link href="/admin/css/area_info.css" rel="stylesheet">
	<link href="/admin/css/custom.css" rel="stylesheet">
	<script type="text/javascript" src="http://api.map.baidu.com/getscript?v=2.0&ak=U25vSd26q851cuSCjMCXuFkYYemWxvRs&services=&t=20170707103901"></script>
@endsection
@section('content')
	<div class="forms">
		<div class=" form-grids row form-grids-right">
			<div class="widget-shadow " data-example-id="basic-forms">
				<div class="form-title">
					<h4>添加网关 :</h4>
				</div>
				<div class="form-body">
					<form action="/admin/gateway/store" method="post" class="form-horizontal" onsubmit="return fun4()" style="position: relative">
						{{csrf_field()}}
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-1 control-label">
								网关编号 :
							</label>
							<div class="col-sm-6">
								<input type="text" class="form-control" name="gataway_id" id="inputEmail3" placeholder="网关编号必须12字符，a-zA-Z0-9!">
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword3" class="col-sm-1 control-label">
								网关名称 :
							</label>
							<div class="col-sm-6">
								<input type="text" class="form-control" name="tb_name" id="inputPassword3" placeholder="网关名称">
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword3" class="col-sm-1 control-label">
								所属类型 :
							</label>
							<div class="col-sm-6">
								<select name="model" id="selector1" class="form-control1">
									<option value="">请选择</option>
									@if(!null == $data)
										@foreach($data as $k=>$v)
											<option value="{{$v['t_model']}}">{{$v['t_model']}}</option>
										@endforeach
									@endif
								</select>
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword3" class="col-sm-1 control-label">
								功率 :
							</label>
							<div class="col-sm-6">
								<select name="txpower" id="selector1" class="form-control1">
									<option value="">请选择</option>
									<option value="10">10dBm</option>
									<option value="13">13dBm</option>
									<option value="17">17dBm</option>
									<option value="20">20dBm</option>
									<option value="24">24dBm</option>
									<option value="31">31dBm</option>
								</select>
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword3" class="col-sm-1 control-label">
								经度 :
							</label>
							<div class="col-sm-6" id="longitude">
								<input type="text" class="form-control" itude="long" name="long" value="" id="inputPassword3" placeholder="113.381500" readonly>
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword3" class="col-sm-1 control-label">
								纬度 :
							</label>
							<div class="col-sm-6" id="latitude">
								<input type="text" class="form-control" itude='lat' name="lat" value="" id="inputPassword3" placeholder="34.435400" readonly>
							</div>
						</div>
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-1 control-label">
								高度 :
							</label>
							<div class="col-sm-6">
								<input type="text" class="form-control" name="height" id="inputEmail3" placeholder="高度">
							</div>
						</div>
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-1 control-label">
								在线状态 :
							</label>
							<div class="radio col-sm-1">
								<label>
									<input type="radio" name="status" value="1" checked="checked">
									在线
								</label>
							</div>
							<div class="radio col-sm-1">
								<label>
									<input type="radio" name="status" value="2">
									关闭
								</label>
							</div>
						</div>
						<div id='allmap' style="width: 40%; height: 100%; position: absolute; top: 0px; right: 0px;">
						</div>
						<div class="col-sm-offset-1">
							<button type="submit" class="btn btn-default">提交</button>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
@endsection
@section('lastjs')
	<script src="/admin/js/map_new.js"></script>
@endsection